package org.myspringframework.test;

import org.myspringframework.beans.factory.FactoryBean;
import org.myspringframework.context.annotation.Component;

@Component
public class MyFactoryBean implements FactoryBean<UserService> {
    public MyFactoryBean(){}

    @Override
    public UserService getObject() throws Exception {
        return new UserService(114514);
    }

    @Override
    public Class<?> getObjectType() {
        return UserService.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
